DISCUSSION
The
ATSUFindFontName function obtains the index and font name of the first font in a name table with a particular font name code, language, platform, and script. If you want to find the index and name of the first font in a name table with a particular font name code, language, platform, and script, call the function
ATSUFindFontFromName. If you want to find, for an indexed font name, the font name and information about the name like type, platform, script ID, and language, call the function
ATSUGetIndFontName.
The best way to use
ATSUFindFontName is to call it twice:
-
Pass the ID of the font whose name table you are searching in the iFontID parameter, NULL for the oName parameter, and 0 for the other parameters. ATSUFindFontName returns the length of the font name string in the oActualNameLength parameter.
-
Allocate enough space for a font name buffer of the returned size, then call the function again, passing a pointer in the oName parameter; on return, the pointer references the font name string.